Amazon Web Services, Inc. is a subsidiary of Amazon that provides on-demand cloud computing platforms and APIs to individuals, companies, and governments, on a metered, pay-as-you-go basis. Clients will often use this in combination with autoscaling.
Microsoft Azure, often referred to as Azure, is a cloud computing platform run by Microsoft. It offers access, management, and the development of applications and services through global data centers
Salesforce, Inc. is an American cloud-based software company headquartered in San Francisco, California. It provides customer relationship management software and applications focused on sales, customer service, marketing automation, e-commerce, analytics, and application development
VMware LLC is an American cloud computing and virtualization technology company with headquarters in Palo Alto, California. VMware was the first commercially successful company to virtualize the x86 architecture. VMware's desktop software runs on Microsoft Windows, Linux, and macOS.
Alibaba Cloud, also known as Aliyun, is a cloud computing company, a subsidiary of Alibaba Group. Alibaba Cloud provides cloud computing services to online businesses and Alibaba's own e-commerce ecosystem.
Oracle Corporation is an American multinational computer technology company headquartered in Austin, Texas, United States. In 2020, Oracle was the third-largest software company in the world by revenue and market capitalization.
Rackspace Technology, Inc. is an American cloud computing company based in Windcrest, Texas, an inner suburb of San Antonio, Texas.
DigitalOcean Holdings, Inc. is an American multinational technology company and cloud service provider. The company is headquartered in New York City, New York, US, with 15 globally distributed data centers. DigitalOcean provides developers, startups, and SMBs with cloud infrastructure-as-a-service platforms.
ServiceNow, Inc. is an American software company based in Santa Clara, California that develops a cloud computing platform to help companies manage digital workflows for enterprise operations.
NetApp, Inc. is an intelligent data infrastructure company that provides unified data storage, integrated data services, and cloud operations solutions to enterprise customers. The company is based in San Jose, California. It has ranked in the Fortune 500 from 2012 to 2021
# lets import libraries
from googleapiclient.discovery import build
import pandas as pd
import seaborn as sns
Function to get Bloomberg channel statistics
api_key = 'AIzaSyB24Kop04L1GlTgRCm1XtQ4KB2a4gaBOwA'
Amazon_Web_Services_channel_id = ['UCd6MoB9NC6uYN2grvUNT-Zg' # Amazon Web Services
]
youtube = build('youtube','v3',developerKey = api_key)
from googleapiclient.errors import HttpError
def get_channel_stats(youtube, Amazon_Web_Services_channel_id):
all_data = []
try:
request = youtube.channels().list(
part='snippet,contentDetails,statistics',
id=','.join(Amazon_Web_Services_channel_id)
)
response = request.execute()
for item in response.get('items', []):
snippet = item.get('snippet', {})
statistics = item.get('statistics', {})
data = {
'Channel_name': snippet.get('title', ''),
'Subscribers': statistics.get('subscriberCount', ''),
'Views': statistics.get('viewCount', ''),
'Total_videos': statistics.get('videoCount', '')
}
all_data.append(data)
except HttpError as e:
print(f"HTTP error occurred: {e}")
print(f"Request URL: {e.resp.request.url}")
print(f"Request body: {e.resp.request.body}")
return all_data
get_channel_stats(youtube,Amazon_Web_Services_channel_id)
[{'Channel_name': 'Amazon Web Services', 'Subscribers': '728000', 'Views': '176423729', 'Total_videos': '16042'}]
channel_statistics = get_channel_stats(youtube, Amazon_Web_Services_channel_id)
Amazon_Web_Services_channel_data =pd.DataFrame(channel_statistics)
Amazon_Web_Services_channel_data
Channel_name | Subscribers | Views | Total_videos | |
---|---|---|---|---|
0 | Amazon Web Services | 728000 | 176423729 | 16042 |
api_key = 'AIzaSyB24Kop04L1GlTgRCm1XtQ4KB2a4gaBOwA'
Microsoft_Azure_channel_id = ['UC0m-80FnNY2Qb7obvTL_2fA' # Microsoft Azure
]
youtube = build('youtube','v3',developerKey = api_key)
from googleapiclient.errors import HttpError
def get_channel_stats(youtube, Microsoft_Azure_channel_id):
all_data = []
try:
request = youtube.channels().list(
part='snippet,contentDetails,statistics',
id=','.join(Microsoft_Azure_channel_id)
)
response = request.execute()
for item in response.get('items', []):
snippet = item.get('snippet', {})
statistics = item.get('statistics', {})
data = {
'Channel_name': snippet.get('title', ''),
'Subscribers': statistics.get('subscriberCount', ''),
'Views': statistics.get('viewCount', ''),
'Total_videos': statistics.get('videoCount', '')
}
all_data.append(data)
except HttpError as e:
print(f"HTTP error occurred: {e}")
print(f"Request URL: {e.resp.request.url}")
print(f"Request body: {e.resp.request.body}")
return all_data
get_channel_stats(youtube, Microsoft_Azure_channel_id)
[{'Channel_name': 'Microsoft Azure', 'Subscribers': '306000', 'Views': '25056291', 'Total_videos': '1509'}]
channel_statistics = get_channel_stats(youtube, Microsoft_Azure_channel_id)
Microsoft_Azure_channel_data =pd.DataFrame(channel_statistics)
Microsoft_Azure_channel_data
Channel_name | Subscribers | Views | Total_videos | |
---|---|---|---|---|
0 | Microsoft Azure | 306000 | 25056291 | 1509 |
api_key = 'AIzaSyB24Kop04L1GlTgRCm1XtQ4KB2a4gaBOwA'
Salesforce_channel_id = ['UCUpquzY878NEaZm5bc7m2sQ' # Salesforce
]
youtube = build('youtube','v3',developerKey = api_key)
from googleapiclient.errors import HttpError
def get_channel_stats(youtube, Salesforce_channel_id):
all_data = []
try:
request = youtube.channels().list(
part='snippet,contentDetails,statistics',
id=','.join(Salesforce_channel_id)
)
response = request.execute()
for item in response.get('items', []):
snippet = item.get('snippet', {})
statistics = item.get('statistics', {})
data = {
'Channel_name': snippet.get('title', ''),
'Subscribers': statistics.get('subscriberCount', ''),
'Views': statistics.get('viewCount', ''),
'Total_videos': statistics.get('videoCount', '')
}
all_data.append(data)
except HttpError as e:
print(f"HTTP error occurred: {e}")
print(f"Request URL: {e.resp.request.url}")
print(f"Request body: {e.resp.request.body}")
return all_data
get_channel_stats(youtube, Salesforce_channel_id)
[{'Channel_name': 'Salesforce', 'Subscribers': '814000', 'Views': '188325513', 'Total_videos': '1199'}]
channel_statistics = get_channel_stats(youtube, Salesforce_channel_id)
Salesforce_channel_data =pd.DataFrame(channel_statistics)
Salesforce_channel_data
Channel_name | Subscribers | Views | Total_videos | |
---|---|---|---|---|
0 | Salesforce | 814000 | 188325513 | 1199 |
api_key = 'AIzaSyB24Kop04L1GlTgRCm1XtQ4KB2a4gaBOwA'
VMWare_channel_id = ['UCZTvfJMhQ5Oc5TFw465tcJQ' # VMWare
]
youtube = build('youtube','v3',developerKey = api_key)
from googleapiclient.errors import HttpError
def get_channel_stats(youtube, VMWare_channel_id):
all_data = []
try:
request = youtube.channels().list(
part='snippet,contentDetails,statistics',
id=','.join(VMWare_channel_id)
)
response = request.execute()
for item in response.get('items', []):
snippet = item.get('snippet', {})
statistics = item.get('statistics', {})
data = {
'Channel_name': snippet.get('title', ''),
'Subscribers': statistics.get('subscriberCount', ''),
'Views': statistics.get('viewCount', ''),
'Total_videos': statistics.get('videoCount', '')
}
all_data.append(data)
except HttpError as e:
print(f"HTTP error occurred: {e}")
print(f"Request URL: {e.resp.request.url}")
print(f"Request body: {e.resp.request.body}")
return all_data
channel_statistics = get_channel_stats(youtube, VMWare_channel_id)
VMWare_channel_data =pd.DataFrame(channel_statistics)
VMWare_channel_data
Channel_name | Subscribers | Views | Total_videos | |
---|---|---|---|---|
0 | VMware | 99200 | 96398711 | 3229 |
api_key = 'AIzaSyB24Kop04L1GlTgRCm1XtQ4KB2a4gaBOwA'
Alibaba_Cloud_channel_id = ['UCipPA-ZHX6UYGH_Iyti1-Jw' # Alibaba Cloud
]
youtube = build('youtube','v3',developerKey = api_key)
from googleapiclient.errors import HttpError
def get_channel_stats(youtube, Alibaba_Cloud_channel_id):
all_data = []
try:
request = youtube.channels().list(
part='snippet,contentDetails,statistics',
id=','.join(Alibaba_Cloud_channel_id )
)
response = request.execute()
for item in response.get('items', []):
snippet = item.get('snippet', {})
statistics = item.get('statistics', {})
data = {
'Channel_name': snippet.get('title', ''),
'Subscribers': statistics.get('subscriberCount', ''),
'Views': statistics.get('viewCount', ''),
'Total_videos': statistics.get('videoCount', '')
}
all_data.append(data)
except HttpError as e:
print(f"HTTP error occurred: {e}")
print(f"Request URL: {e.resp.request.url}")
print(f"Request body: {e.resp.request.body}")
get_channel_stats(youtube, Alibaba_Cloud_channel_id )
Alibaba_Cloud_channel_data =pd.DataFrame(channel_statistics)
Alibaba_Cloud_channel_data
Channel_name | Subscribers | Views | Total_videos | |
---|---|---|---|---|
0 | VMware | 99200 | 96398711 | 3229 |
api_key = 'AIzaSyB24Kop04L1GlTgRCm1XtQ4KB2a4gaBOwA'
Oracle_channel_id = ['UCHCThmyZ-2yWkv0UVeBDdnQ' # Oracle
]
youtube = build('youtube','v3',developerKey = api_key)
from googleapiclient.errors import HttpError
def get_channel_stats(youtube, Oracle_channel_id):
all_data = []
try:
request = youtube.channels().list(
part='snippet,contentDetails,statistics',
id=','.join(Oracle_channel_id)
)
response = request.execute()
for item in response.get('items', []):
snippet = item.get('snippet', {})
statistics = item.get('statistics', {})
data = {
'Channel_name': snippet.get('title', ''),
'Subscribers': statistics.get('subscriberCount', ''),
'Views': statistics.get('viewCount', ''),
'Total_videos': statistics.get('videoCount', '')
}
all_data.append(data)
except HttpError as e:
print(f"HTTP error occurred: {e}")
print(f"Request URL: {e.resp.request.url}")
print(f"Request body: {e.resp.request.body}")
return all_data
get_channel_stats(youtube, Oracle_channel_id)
[{'Channel_name': 'Oracle', 'Subscribers': '126000', 'Views': '35753084', 'Total_videos': '4341'}]
channel_statistics = get_channel_stats(youtube, Oracle_channel_id)
Oracle_channel_data =pd.DataFrame(channel_statistics)
Oracle_channel_data
Channel_name | Subscribers | Views | Total_videos | |
---|---|---|---|---|
0 | Oracle | 126000 | 35753084 | 4341 |
api_key = 'AIzaSyB24Kop04L1GlTgRCm1XtQ4KB2a4gaBOwA'
Rackspace_channel_id = ['UCG0VI_ayS-I0RQpBna4Tisw' # Rackspace
]
youtube = build('youtube','v3',developerKey = api_key)
from googleapiclient.errors import HttpError
def get_channel_stats(youtube, Rackspace_channel_id):
all_data = []
try:
request = youtube.channels().list(
part='snippet,contentDetails,statistics',
id=','.join(Rackspace_channel_id)
)
response = request.execute()
for item in response.get('items', []):
snippet = item.get('snippet', {})
statistics = item.get('statistics', {})
data = {
'Channel_name': snippet.get('title', ''),
'Subscribers': statistics.get('subscriberCount', ''),
'Views': statistics.get('viewCount', ''),
'Total_videos': statistics.get('videoCount', '')
}
all_data.append(data)
except HttpError as e:
print(f"HTTP error occurred: {e}")
print(f"Request URL: {e.resp.request.url}")
print(f"Request body: {e.resp.request.body}")
return all_data
get_channel_stats(youtube, Rackspace_channel_id)
[{'Channel_name': 'Rackspace Technology', 'Subscribers': '28700', 'Views': '10283456', 'Total_videos': '1139'}]
channel_statistics = get_channel_stats(youtube, Rackspace_channel_id)
Rackspace_channel_data =pd.DataFrame(channel_statistics)
Rackspace_channel_data
Channel_name | Subscribers | Views | Total_videos | |
---|---|---|---|---|
0 | Rackspace Technology | 28700 | 10283456 | 1139 |
api_key = 'AIzaSyB24Kop04L1GlTgRCm1XtQ4KB2a4gaBOwA'
Digital_Ocean_channel_id = ['UCaPX53JLxxSbwZz_Ra_cL0g' # Digital Ocean
]
youtube = build('youtube','v3',developerKey = api_key)
from googleapiclient.errors import HttpError
def get_channel_stats(youtube, Digital_Ocean_channel_id):
all_data = []
try:
request = youtube.channels().list(
part='snippet,contentDetails,statistics',
id=','.join(Digital_Ocean_channel_id)
)
response = request.execute()
for item in response.get('items', []):
snippet = item.get('snippet', {})
statistics = item.get('statistics', {})
data = {
'Channel_name': snippet.get('title', ''),
'Subscribers': statistics.get('subscriberCount', ''),
'Views': statistics.get('viewCount', ''),
'Total_videos': statistics.get('videoCount', '')
}
all_data.append(data)
except HttpError as e:
print(f"HTTP error occurred: {e}")
print(f"Request URL: {e.resp.request.url}")
print(f"Request body: {e.resp.request.body}")
return all_data
get_channel_stats(youtube, Digital_Ocean_channel_id)
[{'Channel_name': 'DigitalOcean', 'Subscribers': '53900', 'Views': '19323262', 'Total_videos': '1106'}]
channel_statistics = get_channel_stats(youtube, Digital_Ocean_channel_id)
Digital_Ocean_channel_data =pd.DataFrame(channel_statistics)
Digital_Ocean_channel_data
Channel_name | Subscribers | Views | Total_videos | |
---|---|---|---|---|
0 | DigitalOcean | 53900 | 19323262 | 1106 |
api_key = 'AIzaSyB24Kop04L1GlTgRCm1XtQ4KB2a4gaBOwA'
ServiceNow_channel_id = ['UCLukrOQYSgsHUR_NSiVZndQ' # ServiceNow
]
youtube = build('youtube','v3',developerKey = api_key)
from googleapiclient.errors import HttpError
def get_channel_stats(youtube, ServiceNow_channel_id):
all_data = []
try:
request = youtube.channels().list(
part='snippet,contentDetails,statistics',
id=','.join(ServiceNow_channel_id)
)
response = request.execute()
for item in response.get('items', []):
snippet = item.get('snippet', {})
statistics = item.get('statistics', {})
data = {
'Channel_name': snippet.get('title', ''),
'Subscribers': statistics.get('subscriberCount', ''),
'Views': statistics.get('viewCount', ''),
'Total_videos': statistics.get('videoCount', '')
}
all_data.append(data)
except HttpError as e:
print(f"HTTP error occurred: {e}")
print(f"Request URL: {e.resp.request.url}")
print(f"Request body: {e.resp.request.body}")
return all_data
get_channel_stats(youtube, ServiceNow_channel_id)
[{'Channel_name': 'ServiceNow', 'Subscribers': '36600', 'Views': '2904291', 'Total_videos': '354'}]
channel_statistics = get_channel_stats(youtube, ServiceNow_channel_id)
ServiceNow_channel_data =pd.DataFrame(channel_statistics)
ServiceNow_channel_data
Channel_name | Subscribers | Views | Total_videos | |
---|---|---|---|---|
0 | ServiceNow | 36600 | 2904291 | 354 |
api_key = 'AIzaSyB24Kop04L1GlTgRCm1XtQ4KB2a4gaBOwA'
NetApp_channel_id = ['UCraITOUxo4l3oYQBH8fofyw' # NetApp
]
youtube = build('youtube','v3',developerKey = api_key)
from googleapiclient.errors import HttpError
def get_channel_stats(youtube, NetApp_channel_id):
all_data = []
try:
request = youtube.channels().list(
part='snippet,contentDetails,statistics',
id=','.join(NetApp_channel_id)
)
response = request.execute()
for item in response.get('items', []):
snippet = item.get('snippet', {})
statistics = item.get('statistics', {})
data = {
'Channel_name': snippet.get('title', ''),
'Subscribers': statistics.get('subscriberCount', ''),
'Views': statistics.get('viewCount', ''),
'Total_videos': statistics.get('videoCount', '')
}
all_data.append(data)
except HttpError as e:
print(f"HTTP error occurred: {e}")
print(f"Request URL: {e.resp.request.url}")
print(f"Request body: {e.resp.request.body}")
return all_data
get_channel_stats(youtube, NetApp_channel_id)
[{'Channel_name': 'NetApp', 'Subscribers': '19400', 'Views': '9444282', 'Total_videos': '874'}]
channel_statistics = get_channel_stats(youtube, NetApp_channel_id)
NetApp_channel_data =pd.DataFrame(channel_statistics)
NetApp_channel_data
Channel_name | Subscribers | Views | Total_videos | |
---|---|---|---|---|
0 | NetApp | 19400 | 9444282 | 874 |
# Combine DataFrames using concat
combined_Cloud_Service_channels_df = pd.concat([
Amazon_Web_Services_channel_data,
Microsoft_Azure_channel_data ,
Salesforce_channel_data ,
VMWare_channel_data ,
Alibaba_Cloud_channel_data,
Oracle_channel_data,
Rackspace_channel_data,
Digital_Ocean_channel_data,
ServiceNow_channel_data,
NetApp_channel_data,
], ignore_index=True)
# Display the result
print(combined_Cloud_Service_channels_df)
Channel_name Subscribers Views Total_videos 0 Amazon Web Services 728000 176423729 16042 1 Microsoft Azure 306000 25056291 1509 2 Salesforce 814000 188325513 1199 3 VMware 99200 96398711 3229 4 VMware 99200 96398711 3229 5 Oracle 126000 35753084 4341 6 Rackspace Technology 28700 10283456 1139 7 DigitalOcean 53900 19323262 1106 8 ServiceNow 36600 2904291 354 9 NetApp 19400 9444282 874
# lets have a look at the datatypes
combined_Cloud_Service_channels_df.info()
<class 'pandas.core.frame.DataFrame'> RangeIndex: 10 entries, 0 to 9 Data columns (total 4 columns): # Column Non-Null Count Dtype --- ------ -------------- ----- 0 Channel_name 10 non-null object 1 Subscribers 10 non-null object 2 Views 10 non-null object 3 Total_videos 10 non-null object dtypes: object(4) memory usage: 452.0+ bytes
# lets change the datatypes to perform visualisations
combined_Cloud_Service_channels_df['Subscribers'] = pd.to_numeric(combined_Cloud_Service_channels_df['Subscribers'])
combined_Cloud_Service_channels_df['Views'] = pd.to_numeric(combined_Cloud_Service_channels_df['Views'])
combined_Cloud_Service_channels_df['Total_videos'] = pd.to_numeric(combined_Cloud_Service_channels_df['Total_videos'])
# letsconirm if the datatypes has changed
combined_Cloud_Service_channels_df.info()
<class 'pandas.core.frame.DataFrame'> RangeIndex: 10 entries, 0 to 9 Data columns (total 4 columns): # Column Non-Null Count Dtype --- ------ -------------- ----- 0 Channel_name 10 non-null object 1 Subscribers 10 non-null int64 2 Views 10 non-null int64 3 Total_videos 10 non-null int64 dtypes: int64(3), object(1) memory usage: 452.0+ bytes
combined_Cloud_Service_channels_df
Channel_name | Subscribers | Views | Total_videos | |
---|---|---|---|---|
0 | Amazon Web Services | 728000 | 176423729 | 16042 |
1 | Microsoft Azure | 306000 | 25056291 | 1509 |
2 | Salesforce | 814000 | 188325513 | 1199 |
3 | VMware | 99200 | 96398711 | 3229 |
4 | VMware | 99200 | 96398711 | 3229 |
5 | Oracle | 126000 | 35753084 | 4341 |
6 | Rackspace Technology | 28700 | 10283456 | 1139 |
7 | DigitalOcean | 53900 | 19323262 | 1106 |
8 | ServiceNow | 36600 | 2904291 | 354 |
9 | NetApp | 19400 | 9444282 | 874 |
import pandas as pd
import matplotlib.pyplot as plt
# Sort the DataFrame by 'Subscribers' in descending order
combined_Cloud_Service_channels_df_subscribers_sorted = combined_Cloud_Service_channels_df.sort_values(by='Subscribers', ascending=False)
# Shorten channel names
combined_Cloud_Service_channels_df_subscribers_sorted['Channel_name'] = combined_Cloud_Service_channels_df_subscribers_sorted['Channel_name'].apply(lambda x: x[:8])
# Plotting Subscribers in descending order
fig, axes = plt.subplots(nrows=3, ncols=1, figsize=(10, 15))
axes[0].bar(combined_Cloud_Service_channels_df_subscribers_sorted['Channel_name'], combined_Cloud_Service_channels_df_subscribers_sorted['Subscribers'], color='blue')
axes[0].set_title('Subscribers')
# Sort the DataFrame by 'Views' in descending order
combined_Cloud_Service_channels_df_views_sorted = combined_Cloud_Service_channels_df.sort_values(by='Views', ascending=False)
# Shorten channel names
combined_Cloud_Service_channels_df_views_sorted['Channel_name'] = combined_Cloud_Service_channels_df_views_sorted['Channel_name'].apply(lambda x: x[:8])
# Plotting Views in descending order
axes[1].bar(combined_Cloud_Service_channels_df_views_sorted['Channel_name'], combined_Cloud_Service_channels_df_views_sorted['Views'], color='green')
axes[1].set_title('Views')
# Sort the DataFrame by 'Total_videos' in descending order
combined_Cloud_Service_channels_df_total_videos_sorted = combined_Cloud_Service_channels_df.sort_values(by='Total_videos', ascending=False)
# Shorten channel names
combined_Cloud_Service_channels_df_total_videos_sorted['Channel_name'] = combined_Cloud_Service_channels_df_total_videos_sorted['Channel_name'].apply(lambda x: x[:8])
# Plotting Total Videos in descending order
axes[2].bar(combined_Cloud_Service_channels_df_total_videos_sorted['Channel_name'], combined_Cloud_Service_channels_df_total_videos_sorted['Total_videos'], color='orange')
axes[2].set_title('Total Videos')
# Adjust layout for better visibility
plt.tight_layout()
# Show the plot
plt.show()